package Practice.String;

public class StringBuilderDemo {
    public static void main(String[] args) {
        String str = "好好学习";
        StringBuilder builder = new StringBuilder(str);


        builder.append("day day up");//追加(在末尾追加
        System.out.println(builder);

        
        
        
        
        builder.delete(5,7);//删除
        System.out.println(builder);



        builder.insert(builder.length(),",就会有个光明的未来");//插入
        System.out.println(builder);

        builder.replace(5,7,"ayd");
        System.out.println(builder);

    }
}
